package cn.kgc.controller;

import cn.hutool.core.collection.CollUtil;
import cn.kgc.common.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
@RequestMapping("/echarts")
public class EchartsController {

    @GetMapping("/example")
    public Result get(){
        Map<String,Object> map = new HashMap<>();
        map.put("x", CollUtil.newArrayList("Mon", "Tue", "Wed", "Thu", "Fri", "Sat","Sun"));
        map.put("y",CollUtil.newArrayList(10, 4, 15, 5, 7, 13, 30));
        return Result.success(map);
    }
}
